﻿using Newtonsoft.Json;

namespace Mafool.Core.Test;

public class Model
{
    /// <summary>
    /// Float示例字段
    /// </summary>
    [JsonProperty(PropertyName = "float_field")]
    [JsonConverter(typeof(FloatConverter))]
    public float FloatField { get; set; }

    /// <summary>
    /// Double示例字段
    /// </summary>
    [JsonProperty(PropertyName = "double_field")]
    [JsonConverter(typeof(DoubleConverter), 3)]
    public double DoubleField { get; set; }

    public override string ToString()
    {
        return JsonConvert.SerializeObject(this);
    }
}